public class NoRaffleState extends State{
    private int integral;
    private Activity activity;

    public NoRaffleState(int integral, Activity activity) {
        this.integral = integral;
        this.activity = activity;
    }

    @Override
    public void deductMoney() {
        if (this.integral>50){
            this.integral=this.integral-50;
            activity.setState(activity.getCanRaffleState());
            System.out.println("50积分已扣除");
        }
        else {
            System.out.println("很抱歉积分不足,不能抽奖");
        }
    }

    @Override
    public boolean raffle() {
        System.out.println("很抱歉,不能抽奖");
        return false;
    }

    @Override
    public void dispensePrize() {
        System.out.println("很抱歉,不能发放奖品");
    }
}
